<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"> <ui:composition
	template="/layout/applicationLayout.xhtml">
	<ui:define name="body">

		<h:form id="form" prependId="false">

			<div
				style="margin-left: auto;margin-right: auto;width:42%;height:7;padding-top: 20px;
                     padding-bottom: 120px;">

			<p:panel header="EFETUAR LANCE">
				<p:messages globalOnly="true" />


				<h:panelGrid columns="2">
					<h:outputText value="Projeto:" />
					<h:outputText value="#{lanceBean.projeto.nome}" />

					<h:outputText value="Categoria:" />
					<h:outputText value="#{lanceBean.projeto.categoria}" />

				</h:panelGrid>

				<!--  Panel para o rótulo, mensagem e campo: Lance -->
				<h:panelGrid columns="1" cellpadding="3">
					<h:panelGrid columns="2">
						<h:outputText value="Lance:" />
						<p:message for="lance" />
					</h:panelGrid>

					<p:spinner id="lance" value="#{lanceBean.lance.valor}" prefix="R$ "/>

				</h:panelGrid>
				
				<!--  Panel para o rótulo, mensagem e campo: Duração -->
				<h:panelGrid columns="1" cellpadding="3">
					<h:panelGrid columns="2">
						<h:outputText value="Duração:" />
						<p:message for="duracao" />
					</h:panelGrid>

					<p:spinner id="duracao" value="#{lanceBean.lance.duracao}" suffix=" Dias"/>

				</h:panelGrid>
				
				<!--  Panel para o rótulo, mensagem e campo: Comentário -->
				<h:panelGrid columns="1" cellpadding="3">
					<h:panelGrid columns="2">
						<h:outputText value="Comentário:" />
						<p:message for="comentario" />
					</h:panelGrid>

					<p:inputTextarea id="comentario" rows="10" cols="80" value="#{lanceBean.lance.comentario}"/>

				</h:panelGrid>
				<div style="text-align:center;">
				<p:commandButton value="Efetuar Lance" 	update="@form" action="#{lanceBean.finalizarLance()}" />
				<p:button value="Voltar" outcome="/freelancer/perfilFreelancer"/>
				</div>


			</p:panel> </div>


		    <p:confirmDialog message="Lance Efetuado com sucesso" widgetVar="msgSucesso">
                <p:button value="OK"   outcome="/freelancer/perfilFreelancer"/>
               
            </p:confirmDialog>
				
				
		


		</h:form>

	</ui:define>

</ui:composition> </html>